<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>中奖列表</title>
    <!-- 引入react核心库 -->
    <script src="./node_modules/react/umd/react.development.js"></script>
    <!-- 引入react-dom -->
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <div id="root"></div>
    <script>
        // 1.创建React元素
        /*
       * <div class='item'>
          <h2 class='title'>中奖列表</h2>
          <ul class='list'>
            <li>1. 张三</li>
            <li>2. 张三</li>
            <li>3. 张三</li>
          </ul>
       </div>
       */
       let item = React.createElement('div',{className:'item',title:'列表'},
        React.createElement('h2',{className:'title'},'中奖列表'),
        React.createElement('ul', {className: 'list'},
            React.createElement('li',null,'张三'),
            React.createElement('li',null,'张四'),
            React.createElement('li',null,'张五'),
        )
       )
    // 2.创建根节点
    let res = ReactDOM.createRoot(document.getElementById('root'))
    // 渲染元素到页面
    res.render(item)
    </script>
</head>
<body>
    
</body>
</html>